<?php
// load thong tin cong ty
//global $companyName,$companyAddress,$companyPhones,$companyFax,$companyEmail,$companySite,$companyMST,$companyContact;

$logo = get_option("mySetting_company_logo");
if(!$logo)
	$logo = '';   //default logo
$companyName 	= get_option("mySetting_company_name");
$companyAddress = get_option("mySetting_company_address");	

$companyPhone   = get_option("mySetting_company_tel");
$companyPhones  = explode(",", $companyPhone);

$companyFax   = get_option("mySetting_company_fax");
$companyEmail   = get_option("mySetting_company_email");
$companySite   = get_option("mySetting_company_website");
$companyMST   = get_option("mySetting_company_sales");
$companyContact   = get_option("mySetting_company_email_contact");
$googleMap		= get_option("mySetting_company_support_google_map");

?>
<?php
//require_once TEMPLATEPATH.'/views/process/process-lien-he.php';

//print_r($_POST);

$error_result = '';
if(wp_verify_nonce($_POST['act_contact_us_send'],'act_contact_us_send'))
{
	if($_POST['contactCaptcha'] != $_SESSION['ma_xac_nhan'])
	{
		$error_result = "Xin lỗi ,Sai mã an toàn.";
		$_SESSION['send_request'] = $_POST;
		//require_once TEMPLATEPATH.'/views/view-lien-he.php';
		echo '
		<script type="text/javascript">
			goToAnchor("#go_booking");
		</script>
		';		
	}
	else 
	{
		$error_result = "Cảm ơn, Yêu cầu của bạn đã được gửi đi thành công.";
		$_SESSION['send_request'] = null;
		include TEMPLATEPATH.'/mails/xtemplate-email-contact-us.php';
		//require_once TEMPLATEPATH.'/views/view-lien-he.php';
		$_SESSION['ma_xac_nhan'] = null;
		echo '
		<script>
			goToAnchor("#go_booking");
		</script>
		';
	}
}
else 
{ 
	$_SESSION['send_request'] = null;
	//require_once TEMPLATEPATH.'/views/view-lien-he.php';
} 
  ?>     